
package com.bk.model;

public class OrderItem {
	/**
	 * `itemid` varchar(32) NOT NULL,
  `count` int(11) DEFAULT NULL,
  `subtotal` double DEFAULT NULL,
  `pid` varchar(32) DEFAULT NULL,
  `oid` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`itemid`),
  KEY `fk_0001` (`pid`),
	 */
	private String itemid;
	private int count;
	private double subtotal;
	private Product product;//商品
	private Order order;//订单
	public String getItemid() {
	
		return itemid;
	}
	public void setItemid(String itemid) {
	
		this.itemid = itemid;
	}
	public int getCount() {
	
		return count;
	}
	public void setCount(int count) {
	
		this.count = count;
	}
	public double getSubtotal() {
	
		return subtotal;
	}
	public void setSubtotal(double subtotal) {
	
		this.subtotal = subtotal;
	}
	public Product getProduct() {
	
		return product;
	}
	public void setProduct(Product product) {
	
		this.product = product;
	}
	public Order getOrder() {
	
		return order;
	}
	public void setOrder(Order order) {
	
		this.order = order;
	}
	@Override
	public String toString() {
		return "OrderItem [itemid=" + itemid + ", count=" + count + ", subtotal=" + subtotal + ", product=" + product
				+ ", order=" + order + "]";
	}
	public OrderItem(String itemid, int count, double subtotal, Product product, Order order) {
		super();
		this.itemid = itemid;
		this.count = count;
		this.subtotal = subtotal;
		this.product = product;
		this.order = order;
	}
	public OrderItem() {
		
		super();
		//TODO 
			
	}
	
	
	

}

	